package cn.gson.springboot.controller;

import cn.gson.springboot.model.pojos.StorageDetail;
import cn.gson.springboot.model.service.StorageDetailService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

@Controller
public class StorageDetailController {
    @Autowired
    StorageDetailService stoService;

    @RequestMapping("sto-detail-list")
    @ResponseBody
    public List<StorageDetail> stoDetailsByStoIdList(Integer stoId){
        List<StorageDetail> sto = stoService.selectStoDetailsByStoId(stoId);
        return sto;
    }
}
